<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/register.css"/>
		<link rel="stylesheet" type="text/css" href="../css/jquery.idcode.css"/>
		<style type="text/css">
			
			.bb{margin-bottom:30px ;}
			.bb a{font-size: 14px;line-height: 20px;}
			.bb a:nth-last-of-type(2){float: right;}
			.theThird {    
				height: 40px;
			    line-height: 40px;
			    margin-top: 40px;
		    }
		    .theThird dt{    
		    	font-weight: normal;
			    font-size: 14px;
			    margin-right: 10px;
			    float: left;
		    }
		    .theThird dd{    
		    	float: left;
		    	display: inline;
	    	}
		    .theThird dd a{
		    	display: inline-block;
			    width: 40px;
			    height: 40px;
			    margin: 0 10px;
			    overflow: hidden;
			    background: url(../img/index-bg.png) no-repeat;
			    background-position: -45px -113px;
		    }
		    .theThird dd a:nth-last-of-type(1){background-position: -55px -170px;}
		</style>		
	</head>
	<body>
		<div id="box">
			<div id="rap">
			<header>
				<h1 class="c1 fl"><a href="/"><img src="../img/logo.png" alt="麦考林"></a></h1>
			</header>
			<div id="login">
				<p style="margin-bottom:20px;">已有麦考林账号 ? 
					<a href="user.php?act=login" title="立即登录">立即登录</a>
					<a href="user.php?act=register3" title="贵宾激活" class="fr">贵宾激活</a>
				</p>
				<form id="myform" enctype="application/x-www-form-urlencoded">
					<label class="text">
						<i></i>
						<input type="text" placeholder="用户名" id="uname" name="uname" value="青旅"/>
						<div class="tishi"></div>
					</label> 										
					
					<label class="text pwd aa">
						<i></i>
						<input type="password" id="upwd" placeholder="密码"  name="upwd" value="111"/>
						<div class="tishi"></div>
					</label>
					
					<label class="text">						
						<input type="text" id="Txtidcode" placeholder="验证码" style="width:70%;" />
						<span id="idcode"></span>
					</label>
					<div class="bb">
						<input type="checkbox" name="" id="checkbox" value="" />
						<a>忘记密码?</a>
						<a>记住密码</a>
					</div>
					<input type="button" name="" id="btn" value="登&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;录" />
					<dl class="theThird">
                        <dt class="fl">合作网站账号登录:</dt>
                        <dd class="fl">
                            <a href="/weibologin/" target="" title="新浪微博" class="sina"></a>
                            <a href="/qq/login.php" target="" title="qq" class="qq"></a>
                        </dd>
                    </dl>
				</form>				
			</div>
		</div>
		
		</div>
		
		<footer>			
				<ul id="foot-top">
					<li>
						<a>	
							<em></em>
							<span id="">100%正品保证</span>															
						</a>
					</li>
					<li>
						<a>
							<em style="background-position: 0 -106px"></em>
							<span id="">专业在线客服</span>															
						</a>
					</li>
					<li>
						<a>
							<em  style="background-position: 0 -212px"></em>
							<span id="">满99元包邮</span>															
						</a>
					</li>
				</ul>
				<div class="fr">
		            <dl>
		                <dt>新手指南</dt>               
		                <dd><a href="#" target="_blank" title="新会员注册">新会员注册</a></dd>
		                <dd><a href="#" target="_blank" title="购物演示">购物演示</a></dd>
		                <dd><a href="#" target="_blank" title="常见问题">常见问题</a></dd>
		            </dl>
		            <dl>
		                <dt>付款方式</dt>
		                <dd><a href="#" target="_blank" title="银行卡支付">银行卡支付</a></dd>
		                <dd><a href="#" target="_blank" title="支付宝支付">支付宝支付</a></dd>
		                <dd><a href="#" target="_blank" title="余额支付">余额支付</a></dd>
		            </dl>
		            <dl>
		                <dt>售后服务</dt>
		                <dd><a href="#" target="_blank" title="退换货政策">退换货政策</a></dd>
		                <dd><a href="#" target="_blank" title="退换货流程">退换货流程</a></dd>
		                <dd><a href="#" target="_blank" title="退款流程">退款流程</a></dd>
		                <dd><a href="#" target="_blank" title="发票说明">发票说明</a></dd>
		            </dl>
		            <dl>
		                <dt>特色服务</dt>
		                <dd><a href="#" target="_blank" title="贵宾专区">贵宾专区</a></dd>
		                <!--<dd><a href="/book/" target="_blank" title="电子刊物">电子刊物</a></dd>-->
		                <dd><a style="cursor:pointer;"  title="在线客服">在线客服</a></dd>
		            </dl>
		             <dl>
		                <dt>麦考林生活家</dt>
		                <dd><img src="../img/dingyue.jpg" alt="麦考林生活家" width="100" height="100"></dd>
		            </dl>
		             <dl class="last">
		                <dt>麦考林服务号</dt>
		                <dd style="margin-left:8px"><img src="../img/fuwu.jpg" alt="麦考林服务号" width="100" height="100"></dd>
		            </dl>
        		</div>
				<div class="foot-b">
					<ul class="clearfix">
	                    <li class="first"><a href="#" rel="nofollow">  关于麦考林</a> </li>
	                    <li><a href="#" target="_blank" rel="nofollow">INVESTOR RELATIONS</a></li>
	                    <li><a href="#" rel="nofollow">联系我们 </a></li>	                    
	                    <li><a href="#" rel="nofollow">服务中心</a></li>
	                    <li class="last"><a href="#" rel="nofollow">加入我们 </a></li>                    
                	</ul>
                	<p><a href="#" target="_blank"><img src="../img/newicon.png" alt="上海工商" width="26" height="28"></a> 沪ICP备05003606号Copyright©2011-2015 MecoxLane Inc. All Rights Reserved</p>
				</div>							
		</footer>
		<div class="foot-bottom">
			<a target="_blank" href="#"><img src="../img/xfwqNew.jpg"></a>　　
			<a target="_blank" href="#"><img src="../img/evaluate.jpg"></a>						　　
			<a target="_blank" href="#"><img src="../img/beian.png">沪公网安备 31010402000234号</a>											
		</div>
	</body>
</html>
<script src="../js/jquery-1.12.3.min.js"></script>
<script src="../js/jquery.idcode.js"></script>	
<script src="../js/tronke.Cookie.js"></script>
<script type="text/javascript">
	$(function(){
		$.idcode.setCode(); //加载验证码
		$("#btn").on("click",function(){
			console.log($.idcode.validateCode());
			var jsonStr=getCookieValueByKey(uname.value);
			if(jsonStr){console.log(jsonStr)}
			else{
				var date = new Date();
    			date.setDate(date.getDate() + 7);
    			setCookie(uname.value, uname.value, date);//保存到cookie中
			}
			setCookie("NAME", uname.value, date);//当前用户名
//			console.log(getCookieValueByKey("NAME"))
			
			if($.idcode.validateCode()){
				$.ajax({
					url:"../php/denglu.php",
					async:true,
					type:"post",
					data:{
						uname:uname.value,
						upwd:upwd.value
					},
					dataType:"json",
					success:function(res){
//						console.log(res);
						alert(res.msg);
						if(res.status==1){
		 					window.location.href="main.html";
		 				}
					}
				})
			}
			
		})
	})
</script>